<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理中心</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>

    <header>
        <img src="" alt="">
        <span class="uname"></span>
        <span>后台管理中心</span>
        <button class="back">退出登录</button>

    </header>

    <div class="container clearfix">

        <div class="left">
            <h2>菜单列表</h2>
            <h3>用户管理</h3>
            <ul>
                <li><a class="userlist">用户列表</a></li>
                <li><a class="adduser">添加用户</a></li>
            </ul>
            <h3>商品管理</h3>
            <ul>
                <li><a class="shoplist">商品列表</a></li>
                <li><a class="addshop">添加添加</a></li>
            </ul>
        </div>
        <div class="right">
            <div class="indexpage">首页</div>
            <!-- <iframe src="" frameborder="0" name="tableContent"></iframe> -->
            <aside>
                <h3>欢迎来到后台管理中心~</h3>
            </aside>
        </div>

    </div>

    <script src="./js/jquery-3.6.0.js"></script>
    <script src="./js/template-web.js"></script>
    <script src="./js/index.js"></script>
    <!-- 用户列表 -->
    <script type="text/html" id="user-list">
        <table>
            <tr>
                <th>序号</th>
                <th>头像</th>
                <th>用户名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>公司</th>
                <th>操作</th>
            </tr>
            {{each ulist}}
            <tr>
                <td>{{$value.uid}}</td>
                <td><img src="{{$value.headerimg}}" alt=""></td>
                <td>{{$value.username}}</td>
                <td>{{$value.age}}</td>
                <td>{{$value.sex==0?'男':'女'}}</td>
                <td>{{$value.company}}</td>
                <td id="del" onclick="deleteUser({{$value.uid}})">删除</td>
            </tr>
            {{/each}}
        </table>
    </script>
    <!-- 添加用户 -->
    <script type="text/html" id="add-user">
        <div class="container">
            <div class="book-add-wrapper">
                <form>
                    <div class="item">
                        <label for="">用户名称: </label>
                        <input type="text" name="bookname" class='bookname' onblur="nameNoEmpty()">
                        <span></span>
                    </div>
                    <div class="item">
                        <label for="">用户年龄: </label>
                        <input type="text" name="bookprice" class='bookprice' onblur="ageNoEmpty()">
                        <span></span>
                    </div>
                    <div class="item">
                        <label for="">用户头像: </label>
                        <input type="text" name="bookpicture" class='bookpicture' onblur="imgUrlEmpty()">
                        <span></span>
                    </div>
                    <button type="button" id="addbookbtn" onclick="addProduct()">添加用户</button>
                </form>
            </div>

        </div>
    </script>
    <script type="text/html" id="shop-list">
        <table>
            <tr>
                <th>序号</th>
                <th>商品图片</th>
                <th>商品信息</th>
                <th>单价</th>
                <th>数量</th>
                <th>总价</th>
                <th>操作</th>
            </tr>
            {{each shoplist}}
            <tr>
                <td>{{$value.id}}</td>
                <td><img src="{{$value.picture}}" alt="shop03"></td>
                <td>{{$value.name}}</td>
                <td>￥{{$value.price}}</td>
                <td>{{$value.num}}</td>
                <td class="sgtotleprice">￥{{$value.singlePrice}}</td>
                <td><a href="#">移入收藏</a><br><a href="#" class="del">删除</a></td>
            </tr>
            {{/each}}
        </table>
    </script>

</body>

</html>